<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 2017-09-26
 * Time: 11:38
 */

namespace app\domain;


use app\src\sunsun\transfer\action\TransferBaseAction;

class SunsunTransferDomain extends BaseDomain
{
    public function sendToGroup(){
        $did = $this->_post('did','');
        $data = $this->_post('data','');
        $action = new TransferBaseAction();
        $ret = $action->sendReqToGroup($did,$data);
        $this->exitWhenError($ret, true);
    }

    public function getGroupInfo(){
        $action = new TransferBaseAction();
        $ret = $action->getAllGroupClientInfo();
        $this->exitWhenError($ret,true);
    }

    public function clientInfoByGroup(){
        $group = $this->_post('group','');
        $action = new TransferBaseAction();
        $ret = $action->clientInfoByGroup($group);
        $this->exitWhenError($ret,true);
    }

    public function clientCountByGroup(){
        $group = $this->_post('group','');
        $action = new TransferBaseAction();
        $ret = $action->clientCountByGroup($group);

        $this->apiReturnSuc($ret['info']);
    }
}